package com.xy.demo.DesignMode.AdapterPattern;

/**
 * @BelongsProject: bill
 * @BelongsPackage: com.xy.demo.DesignMode.AdapterPattern
 * @Author: YangHao
 * @CreateTime: 2023-08-07  14:29
 * @Description: 对象适配器
 * @Version: 1.0
 */
public class AdapterObjectOne implements TargetOne{

    private AdapteeOne adapteeOne = new AdapteeOne();

    @Override
    public int outputDC5V() {

       int adapterInter = adapteeOne.outputAC220V();

       int adapterOutput = adapterInter/44;

       System.out.println("接入电压："+adapterInter+"V"+",输出电压："+adapterOutput+"V");

       return adapterOutput;
    }
}
